#include "../terra-ge.h"

#ifndef TERRAGE_MANAGER_H_INCLUDED
#define TERRAGE_MANAGER_H_INCLUDED

namespace TerraGE {
    class Shader {
        protected:
            string name;

            GLhandleARB handle;         // Handle to the fragment shader program.
            GLhandleARB handle_source;  // Handle to the source of the fragment shader program.
        public:
            Shader(string nm);

            void Set_Integer(string nm, int v);
            void Set_Float(string nm, float v);
            void Set_Float2v(string nm, float *v);
            void Set_Float3v(string nm, float *v);
            void Set_Float_Array(string nm, long offset, long nelements, float *v);

            void Set_Texture(string nm, GLint unit, ALLEGRO_BITMAP *b);

            void Apply();
            void Clear();

            string Get_Name() {return name;}
    };

    class Shader_Manager {
        protected:
            list<Shader *> shaders;
        public:
            Shader_Manager();

            Shader *Get_Shader(string nm);
    };
}

#endif
